import request from '@/utils/request.js'


//更新
export const updateTopic = ({id,topicName,topicContent,
    answers:{TopicId,AnswerType,CementValue,CementProportion,
        WaterValue,WaterProportion,SandValue,SandProportion,
        GravelValue,GravelProportion,DeviationValue}})=>
        request.put(`app/topic/${id}`,{topicName,topicContent,
            answers:{TopicId,AnswerType,CementValue,CementProportion,
                WaterValue,WaterProportion,SandValue,SandProportion,
                GravelValue,GravelProportion,DeviationValue}})

//根据ID下载作业记录
export const WordDown=(Jobid) =>
request.get(`JobRecord/WordDownloadFile?Jobid=${Jobid}`)

//新增
export const createJob=(data)=>
request.post('app/job-record',data)

//分页查询
//带分页查询
export const getJobPage=({Storing,SkipCount,MaxResultCount})=>
request.get(`app/player?Storing=${Storing}&SkipCount=${SkipCount}&MaxResultCount=${MaxResultCount}`)


//更新
export const updateJob = ({id,playerId,topicId,jobContent})=>
request.put(`app/job-recoed/${id}`,{playerId,topicId,jobContent})

//删除
export const deleteJob = (id)=>
request.delete(`app/job-recoed/${id}`)

//获取单条
export const getJob =(id)=>
request.get(`app/job-recoed/${id}`)